﻿using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Razor.TagHelpers;

namespace ReaWTM.LayuiHelper
{

	[HtmlTargetElement("wt:br", TagStructure = TagStructure.WithoutEndTag)]
	public class BrTagHelper : BaseElementTag
	{
		public bool Clear { get; set; } = true;
		public override void Process(TagHelperContext context, TagHelperOutput output)
		{
			output.TagName = "br";
			output.TagMode = TagMode.StartTagOnly;
			if (Clear)
			{
				output.Attributes.Add("style", "clear:both;");
			}
		}

	}
}
